﻿@model WeProjects.Models.MemberViewModel

@{
    ViewBag.Title = "Delete";
}

<h2>删除用户</h2>
<p class="buttonIn">
    @Html.ActionLink("返回列表", "Index")
</p>

<div class="bs-callout bs-callout-danger">
    <h4>确认删除此用户？ （请确保该用户没有关联数据！）</h4>
        <p>
            @Html.DisplayNameFor(model => model.Name)：@Html.DisplayFor(model => model.Name)
        </p>
        <p>
            @Html.DisplayNameFor(model => model.DisplayName)：@Html.DisplayFor(model => model.DisplayName)
        </p>
    <label>发布的新闻：</label>
        @foreach (var n in Model.AuthoredNews)
        { <p>
            @Html.Raw(n.Title+" ->["+n.ProjectTitle+"]")           
          </p>
        }
    <label>参与的项目</label>
    @foreach (var n in Model.JoinedProjects)
    { <p>
        @Html.Raw(n.Title)
    </p>
    }
    <label>负责的项目</label>
    @foreach (var n in Model.OwnedProjects)
    { <p>
        @Html.Raw(n.Title)
    </p>
    }
    <label>上传的文件</label>
    @foreach (var n in Model.UploadedDocuments)
    { <p>
        @Html.Raw(String.Format("{0} ->[{1}]",n.Name,n.Project!=null?n.Project.Title:""))
    </p>
    }
    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        <p>
            <input type="submit" value="Delete" class="btn btn-danger width-20p" />
        </p>
    }
</div>